package com.example.springboot.application.dao;/*
 * Created by 18012 on 2018/4/14.
 * desc:
 */

import com.example.springboot.application.entity.SystemUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface SystemUserJPA extends JpaRepository<SystemUser,String> {
    @Query("SELECT u FROM SystemUser u WHERE LOWER(u.username) = LOWER(:username)")
    SystemUser findByUsernameCaseInsensitive(@Param("username") String username);
}
